import ora from 'ora'

const spinner = ora();

// 打印打包日志
export default function log() {
  return {
    name: 'log',
    buildStart() {
      spinner.info('start processing');
    },
    resolveId(id) {
      spinner.start(`processing ${id} `);
      return null
    },
    buildEnd() {
      spinner.succeed('complete processing');
      spinner.stop();
    }
  };
}
